using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Chapter5CustomControlsCS
{
  
    [ToolboxData("<{0}:FourthSample runat=server></{0}:FourthSample>")]
    public class FourthSample : System.Web.UI.WebControls.WebParts.WebPart
    {
        private string strSubTitle;
        private string _Title = "Sample WebPart";

        public FourthSample()
        {
            strSubTitle = "As of " + System.DateTime.Now.ToString();
            this.TitleIconImageUrl = "book.gif";
            this.Init += new EventHandler(FourthSample_Init);        
        }

        void FourthSample_Init(object sender, EventArgs e)
        {
            base.HelpUrl = "http://www.phvis.com/Booksite.htm";
        }
                
        private void BookDisplay_Init(object sender, System.EventArgs e)
        {
            base.HelpUrl = "http://www.phvis.com/Booksite.htm";
        }

        
        public override string Title
        {
            get
            {
                return base.Title;
            }
            set
            {
                base.Title = _Title;
            }
        }

        public override string Subtitle
        {
            get
            {
                return strSubTitle;
            }
        }
        protected override void Render(HtmlTextWriter writer)
        {
            base.Render(writer);            
        }
    }
}
